import request from "@/utils/request";

// 查询学习进度列表
export function listResourceProgress(query) {
  return request({
    url: "/business/resourceProgress/list",
    method: "get",
    params: query,
  });
}

// 查询学习进度所有列表
export function listAllResourceProgress(query) {
  return request({
    url: "/business/resourceProgress/listAll",
    method: "get",
    params: query,
  });
}

// 查询学习进度详细
export function getResourceProgress(id) {
  return request({
    url: "/business/resourceProgress/getInfo/" + id,
    method: "get",
  });
}

// 新增学习进度
export function addResourceProgress(data) {
  return request({
    url: "/business/resourceProgress/add",
    method: "post",
    data: data,
  });
}

// 修改学习进度
export function updateResourceProgress(data) {
  return request({
    url: "/business/resourceProgress/edit",
    method: "post",
    data: data,
  });
}

// 删除学习进度
export function delResourceProgress(id) {
  return request({
    url: "/business/resourceProgress/remove/" + id,
    method: "get",
  });
}

// 查询学习完成度
export function getProgressResourceProgress() {
  return request({
    url: "/business/resourceProgress/getProgress",
    method: "get",
  });
}
